<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="./jquery.min.js"></script>
</head>
<body>
    <h1>支付宝测试</h1>

    <button id="btn" type="button">付款</button>
    <script>
        
        $("#btn").on("click",function(){
            $.ajax({
                type:"get",
                url:"/pay",
                success:function(res){
                    console.log(res.url);
                    location.href=res.url;
                }
            })
        })
    
    </script>
</body>
</html>